  @extends('blog.master')

  @section('content')



<p>{{$nav}}</p>
<p>用户名:{{$user}}</p>
  <a class="btn btn-primary" href="{{url('b/create')}}">添加文章</a>


@foreach($blogs as $blog)

 <div class="panel panel-default">
  <div class="panel-body">
   
   {{$blog->title}}

    <a href="{{url('/b',$blog->id)}}" class="btn btn-info">阅读</a>
    <a href='{{url("/b/$blog->id/edit")}}' class="btn btn-info">修改</a>
      <form action="{{ route('b.destroy', $blog->id) }}" method="post" style="display: inline-block;">

        {{ csrf_field() }}
         {{ method_field('DELETE') }}
            
            <button type="submit" class="btn btn-danger">删除</button>
        </form>
    </div>
    </div>
@endforeach



     
  <ul class="pagination">
  <!-- <li class="disabled"><span>«</span></li> 
  <li class="active"><span>1</span></li>
  <li><a href="#">2</a></li>
  <li><a href="#" rel="next">»</a></li> -->
  {!! $blogs->render() !!}
  </ul>

  @endsection